const { MARKET_COUPON_STATUS } = require('./market');
// 会员性别
const MEMBER_GENDER = {
    0: 'unknow',
    1: 'male',
    2: 'female',
};

const MEMBER_COUPON_TABSLIST = [{
    title: '未使用',
    type: MARKET_COUPON_STATUS.normal,
}, {
    title: '已使用',
    type: MARKET_COUPON_STATUS.used,
}, {
    title: '已过期',
    type: MARKET_COUPON_STATUS.expired,
}];

const MEMBER_BALANCE_LOG_TYPE = {
    consumption: 'consumption', // 消费
    consumptionRefund: 'consumption_refund', // 消费退款
    recharge: 'recharge', // 余额充值
    rechargeRefund: 'recharge_refund', // 充值退款
    gift: 'gift', // 充值送现金
    giftRefund: 'gift_refund', // 充值送退款
};

const MEMBER_BALANCE_LOG_TYPE_VALUE = {
    [MEMBER_BALANCE_LOG_TYPE.consumption]: '消费',
    [MEMBER_BALANCE_LOG_TYPE.consumptionRefund]: '消费退款',
    [MEMBER_BALANCE_LOG_TYPE.recharge]: '余额充值',
    [MEMBER_BALANCE_LOG_TYPE.rechargeRefund]: '充值退款',
    [MEMBER_BALANCE_LOG_TYPE.gift]: '充值送现金',
    [MEMBER_BALANCE_LOG_TYPE.giftRefund]: '充值送退款',
};

const MEMBER_BALANCE_LOG_TYPE_PREFIX_VALUE = {
    [MEMBER_BALANCE_LOG_TYPE.consumption]: '-',
    [MEMBER_BALANCE_LOG_TYPE.consumptionRefund]: '+',
    [MEMBER_BALANCE_LOG_TYPE.recharge]: '+',
    [MEMBER_BALANCE_LOG_TYPE.rechargeRefund]: '-',
    [MEMBER_BALANCE_LOG_TYPE.gift]: '+',
    [MEMBER_BALANCE_LOG_TYPE.giftRefund]: '-',
};

const MEMBER_INTEGRAL_LOG_TYPE = {
    consumption: 'consumption', // 消费
    consumptionRefund: 'consumption_refund', // 消费退款
    award: 'award', // 赠送
    awardCancel: 'award_cancel', // 撤销赠送
    sign: 'sign', // 签到
};

const MEMBER_INTEGRAL_LOG_TYPE_VALUE = {
    [MEMBER_INTEGRAL_LOG_TYPE.consumption]: '消费',
    [MEMBER_INTEGRAL_LOG_TYPE.consumptionRefund]: '消费退款',
    [MEMBER_INTEGRAL_LOG_TYPE.award]: '赠送',
    [MEMBER_INTEGRAL_LOG_TYPE.awardCancel]: '撤销赠送',
    [MEMBER_INTEGRAL_LOG_TYPE.sign]: '签到',
};

module.exports = {
    MEMBER_GENDER,
    MEMBER_COUPON_TABSLIST,
    MEMBER_BALANCE_LOG_TYPE,
    MEMBER_BALANCE_LOG_TYPE_VALUE,
    MEMBER_BALANCE_LOG_TYPE_PREFIX_VALUE,
    MEMBER_INTEGRAL_LOG_TYPE,
    MEMBER_INTEGRAL_LOG_TYPE_VALUE,
};